﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LockCrypt.Core.AutoType {
    public class WaitCommand : AutoTypeCommand {
        /// <summary>
        /// Gets or sets the delay to wait.
        /// </summary>
        /// <value>The delay.</value>
        public int Delay { get; set; }

        public WaitCommand(int delay) {
            this.Action = CommandType.Wait;
            this.Delay = delay;
        }

        /// <summary>
        /// Serializes this command.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this command.
        /// </returns>
        public override string ToString() {
            return Delay > 0 ? string.Format("{{Wait:{0}}}\n", Delay) : string.Empty;
        }
    }
}
